package com.iuhao.user.controller;

import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * Created by yanhao on 2018/10/30.
 */
@RestController
@RequestMapping("/user")
public class UserController {


    @Value("${productionModel}")
    private String productionModel;

    @RequestMapping(value = "/test", method = RequestMethod.GET)
    @ApiOperation(value = "测试", notes = "用户登陆")
    public String getProductionModel() {
        return productionModel;
    }

    @Value("${server.port}")
    String port;

    @RequestMapping("/hi")
    public String home(@RequestParam String name) {
        return "hi "+name+",i am from port:" +port;
    }
}
